using System;
using System.Diagnostics;
using System.Globalization;

namespace Atomic.Thermodynamics.Phonons
{
	[Serializable]
	[DebuggerDisplay("{DebuggerDisplay}")]
	public class PhononStateDensityPoint : IPhononStateDensityPoint
	{
		public PhononStateDensityPoint(double frequency, double density)
		{
			Frequency = frequency;
			Density = density;
		}

		/// <summary>
		/// Phonon frequency in Hz. This is NOT the angular frequency.
		/// </summary>
		public double Frequency
		{
			get;
			private set;
		}

		/// <summary>
		/// Phonon density of states in Hz^{-1}.
		/// </summary>
		public double Density
		{
			get;
			private set;
		}

		private string DebuggerDisplay
		{
			get
			{
				return string.Format(CultureInfo.InvariantCulture, "Frequency = {0:f4}, Density = {1:f4}", Frequency, Density);
			}
		}
	}
}
